
Set conn = CreateObject("ADODB.Connection")
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\mzavaleta.SPSA\Documents\Visual Studio 2008\Projects\portero-llaves\portero\bin\x86\Debug\bd\bdPortero.mdb;Jet OLEDB:Database Password=portero"
conn.Open strConnect
'Tabla reg_llave
StrSQL="drop table mllave"
conn.Execute(StrSQL)
strSQL="CREATE TABLE  mllave (codigo text(15) PRIMARY KEY,detalle text(35),cant1 SMALLINT,cant2 SMALLINT, idlocal integer, estado char(1) default 'E', ult_id integer default 0)"
conn.Execute(StrSQL)

'Tabla motivo
StrSQL="drop table motivo"
conn.Execute(StrSQL)
strSQL="Create Table motivo (id Counter Primary Key, Nombre Text(35));"
conn.Execute(StrSQL)

'Tabla movil
StrSQL="drop table movil"
conn.Execute(StrSQL)
strSQL="Create Table movil (num_doc text(12) Primary Key, num_movil Text(11));"
conn.Execute(StrSQL)


'Tabla reg_llave
StrSQL="drop table reg_llave"
conn.Execute(StrSQL)
strSQL="Create Table reg_llave(id integer PRIMARY KEY, entrega  datetime,num_doc text(15),ape_pat text(30),ape_mat text(30),nombres text(35),empresa text (50),"
strsql=strSQL+" autoriza text(15),motivo text(35),movil text(11),llav_codigo text(15),llav_ambiente text(35),llav_cant1 SMALLINT, llav_cant2 SMALLINT,"
strsql=strSQL+" observ text(50), devolucion  datetime, id_loc SMALLINT,id_login_entrega integer, id_login_devolucion integer)"

conn.Execute(StrSQL)
